package com.bj.dz.controller;

import com.bj.dz.entity.StoreairboxDataformat;
import com.bj.dz.service.StoreairboxDataformatService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/***
*   控制器
*/
@Slf4j
@Api(tags = "【storeairboxData】提供服务接口")
@RestController
@RequestMapping("/storeairboxDataformat")
public class StoreairboxDataformatController {

    @Resource
    private StoreairboxDataformatService storeairboxDataformatService;

    /**
    * 通过id查询
    * @param
    * @return
    */
    @ApiOperation(value = "查找服务")
    @RequestMapping(value="/findById",method = RequestMethod.POST, produces = "application/json;" +"charset=UTF-8")
    public StoreairboxDataformat findStoreairboxDataformatById(@ApiParam(name = "id",value = "StoreairboxDataformat的id",required = true) @RequestParam(value = "id",required=true)Integer id){
        return storeairboxDataformatService.getStoreairboxDataformatById(id);
    }

    /**
    * 通过多个查询
    * @param
    * @return
    */
    @ApiOperation(value = "查找多个服务")
    @RequestMapping(value="/findStoreairboxDataformats",method = RequestMethod.POST, produces = "application/json;" +"charset=UTF-8")
    public List<StoreairboxDataformat> findStoreairboxDataformatListByMap(@ApiParam(name = "StoreairboxDataformat",value = "storeairboxDataformat",required = true)@RequestBody StoreairboxDataformat storeairboxDataformat){

        return storeairboxDataformatService.getStoreairboxDataformatListByMap(null);
    }

    /**
    * 查询总数
    * @param
    * @return
    */
    @ApiOperation(value = "获取总数服务")
    @RequestMapping(value="/count",method = RequestMethod.POST, produces = "application/json;" +"charset=UTF-8")
    public Integer StoreairboxDataformatCount(){
        return storeairboxDataformatService.getStoreairboxDataformatCountByMap(null);
    }

    /**
    * 添加保存
    * @param
    * @return
    */
    @ApiOperation(value = "添加服务")
    @RequestMapping(value="/add",method = RequestMethod.POST, produces = "application/json;" +"charset=UTF-8")
    public boolean addStoreairboxDataformat(@ApiParam(name = "StoreairboxDataformat",value = "storeairboxDataformat对象",required = true)@RequestBody StoreairboxDataformat storeairboxDataformat){
            return storeairboxDataformatService.addStoreairboxDataformat(storeairboxDataformat);
    }

    /**
    * 更新修改
    * @param
    * @return
    */
    @ApiOperation(value = "更新修改服务")
    @RequestMapping(value="/upd",method = RequestMethod.POST, produces = "application/json;" +"charset=UTF-8")
    public boolean modifyStoreairboxDataformat(@ApiParam(name = "StoreairboxDataformat",value = "storeairboxDataformat对象",required = true)@RequestBody StoreairboxDataformat storeairboxDataformat){
        return storeairboxDataformatService.modifyStoreairboxDataformat(storeairboxDataformat);
    }

    /**
    * 删除
    * @param
    * @return
    */
    @ApiOperation(value = "删除服务")
    @RequestMapping(value="/del",method = RequestMethod.POST, produces = "application/json;" +"charset=UTF-8")
    public boolean deleteStoreairboxDataformatById(@ApiParam(name = "StoreairboxDataformat",value = "storeairboxDataformat的id",required = true) @RequestParam(value = "id",required=true)Integer id){
        return storeairboxDataformatService.deleteStoreairboxDataformatById(id);
    }



}
